﻿@using NewsMvc.Models.Database
@{
	ViewData["Title"] = "NewWebsiteDetail";
	Layout = "/Views/Shared/_Layout.cshtml";
	var articles = ViewData["Articles"] as Article;//将ViewData["Articles"]返回的object类型转为Article表的实体类；@{}有两种方式：从C#代码块转换为HTML元素；在HTML中嵌入C#表达式，@articles.Title：表达式
}


<body>


	<div id="main">
		@{
			<h1 class="detail-title">@articles.Title</h1>
			<div class="post_info">
				<span>@articles.PublishDate</span>　来源: <span>@articles.Source</span>
			</div>
			<div class="post_content">@articles.Content</div>

		}

	</div>

</body>